# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.TravelImpactModel.V1.Model.EmissionsGramsPerPax do
  @moduledoc """
  Grouped emissions per seating class results.

  ## Attributes

  *   `business` (*type:* `integer()`, *default:* `nil`) - Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not.
  *   `economy` (*type:* `integer()`, *default:* `nil`) - Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not.
  *   `first` (*type:* `integer()`, *default:* `nil`) - Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not.
  *   `premiumEconomy` (*type:* `integer()`, *default:* `nil`) - Emissions for one passenger in premium economy class in grams. This field is always computed and populated, regardless of whether the aircraft has premium economy class seats or not.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :business => integer() | nil,
          :economy => integer() | nil,
          :first => integer() | nil,
          :premiumEconomy => integer() | nil
        }

  field(:business)
  field(:economy)
  field(:first)
  field(:premiumEconomy)
end

defimpl Poison.Decoder, for: GoogleApi.TravelImpactModel.V1.Model.EmissionsGramsPerPax do
  def decode(value, options) do
    GoogleApi.TravelImpactModel.V1.Model.EmissionsGramsPerPax.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.TravelImpactModel.V1.Model.EmissionsGramsPerPax do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
